package com.powermanager.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.powermanager.R;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends BaseActivity {

    @Bind(R.id.main_iv_setting)
    ImageView mIvSetting;
    @Bind(R.id.main_layout_useline)
    LinearLayout mLayoutUseline;
    @Bind(R.id.main_layout_timeline)
    LinearLayout mLayoutTimeline;
    @Bind(R.id.main_layout_mode)
    LinearLayout mLayoutMode;
    @Bind(R.id.main_layout_analyse)
    LinearLayout mLayoutAnalyse;
    @Bind(R.id.main_layout_homesafe)
    LinearLayout mLayoutHomesafe;
    @Bind(R.id.main_layout_czmanager)
    LinearLayout mLayoutCzmanager;
    @Bind(R.id.main_layout_message)
    LinearLayout mLayoutMessage;
    @Bind(R.id.main_layout_environment)
    LinearLayout mLayoutEnvironment;
    @Bind(R.id.main_layout_out)
    LinearLayout mLayoutOut;
    @Bind(R.id.main_layout_safe)
    LinearLayout mLayoutSafe;
    @Bind(R.id.main_layout_neighbor)
    LinearLayout mLayoutNeighbor;
    @Bind(R.id.main_layout_healthylife)
    LinearLayout mLayoutHealthylife;
    @Bind(R.id.main_layout_newspaper)
    LinearLayout mLayoutNewspaper;
    @Bind(R.id.main_layout_childread)
    LinearLayout mLayoutChildread;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.actiivty_main);
        ButterKnife.bind(this);

        Intent intent = new Intent(MainActivity.this,SetIPActivity.class);
        startActivity(intent);
    }

    @OnClick({R.id.main_iv_setting, R.id.main_layout_useline, R.id.main_layout_timeline, R.id.main_layout_mode, R.id.main_layout_analyse, R.id.main_layout_homesafe, R.id.main_layout_czmanager, R.id.main_layout_message, R.id.main_layout_environment, R.id.main_layout_out, R.id.main_layout_safe, R.id.main_layout_neighbor, R.id.main_layout_healthylife, R.id.main_layout_newspaper, R.id.main_layout_childread})
    public void onClick(View view) {
        Intent intent = new Intent();
        switch (view.getId()) {
            case R.id.main_iv_setting:
                break;
            case R.id.main_layout_useline:
                intent.setClass(MainActivity.this,UseLineActivity.class);
                break;
            case R.id.main_layout_timeline:
                intent.setClass(MainActivity.this,TimerActivity.class);
                break;
            case R.id.main_layout_mode:
                intent.setClass(MainActivity.this,SceneActivity.class);
                break;
            case R.id.main_layout_analyse:
                intent.setClass(MainActivity.this,EletricAnalyseActivity.class);
                break;
            case R.id.main_layout_homesafe:
                intent.setClass(MainActivity.this,HomeSafeActivity.class);

                break;
            case R.id.main_layout_czmanager:
                intent.setClass(MainActivity.this,SocketManaActivity.class);
                break;
            case R.id.main_layout_message:
                intent.setClass(MainActivity.this,MsgRemindActivity.class);
                break;
            case R.id.main_layout_environment:
                intent.setClass(MainActivity.this,EnvironmentActivity.class);
                break;
            case R.id.main_layout_out:
                intent.setClass(MainActivity.this,OutsideActivity.class);
                break;
            case R.id.main_layout_safe:
                intent.setClass(MainActivity.this,BLLifeActivity.class);
                break;
            case R.id.main_layout_neighbor:
                intent.setClass(MainActivity.this,NeigbourActivity.class);
                break;
            case R.id.main_layout_healthylife:
                intent.setClass(MainActivity.this,BulterActivity.class);
                break;
            case R.id.main_layout_newspaper:
                intent.setClass(MainActivity.this,DailyNewsActivity.class);
                break;
            case R.id.main_layout_childread:
                intent.setClass(MainActivity.this,ChildActivity.class);
                break;
        }
        startActivity(intent);
    }
}
